package com.isoft.airportsystem.mapper.Flight;

import com.isoft.airportsystem.entity.flight.Airport;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface AirportMapper {
    // 查询所有机场
    List<Airport> selectAllAirports();

    // 根据代码查询机场
    Airport selectByCode(@Param("airportCode") String airportCode);

    // 根据条件查询机场
    List<Airport> selectAirportsByCondition(Airport airport);

    // 分页查询机场
    List<Airport> selectAirportPage(@Param("offset") int offset,
                                    @Param("limit") int limit,
                                    @Param("airport") Airport airport);

    // 统计机场数量
    int countAirports(Airport airport);

    int insertAirport(Airport airport);
    int updateAirport(Airport airport);
    int deleteAirport(@Param("airportCode") String airportCode);
}
